# ------------------------------------------------------------------------------
# pose.pytorch
# Copyright (c) 2018-present Microsoft
# Licensed under The Apache-2.0 License [see LICENSE for details]
# Written by Bin Xiao (Bin.Xiao@microsoft.com)
# ------------------------------------------------------------------------------

'''
添加sys.path系统路径，在import的时候首先会从这里去寻找，在import的时候就可以比较简单。

'''
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function

import os.path as osp
import sys


'''
也可以使用sys.path.append()来添加路径，但是添加的路径被放在列表的末尾了，优先级就比较差
如果使用个sys.path.insert(0,path)新添加的路径就会被放在最前面，优先级比较高
'''
def add_path(path):
    if path not in sys.path:
        sys.path.insert(0, path)


this_dir = osp.dirname(__file__)

lib_path = osp.join(this_dir, '..', 'lib')
add_path(lib_path)

mm_path = osp.join(this_dir, '..', 'lib/poseeval/py-motmetrics')
add_path(mm_path)


def print_addr():
    print(lib_path)  # G:/TransPose-main/tools\..\lib
    print(mm_path)  # G:/TransPose-main/tools\..\lib/poseeval/py-motmetrics


print_addr()
